<template>
  <!-- 分页组件 -->
  <el-row type="flex" justify="end" align="middle" style="height: 60px">
    <el-pagination
      :current-page="pageParams.page"
      :page-sizes="[5, 6, 7, 8]"
      :page-size="100"
      layout="total, sizes, prev, pager, next, jumper"
      :total="total"
      @size-change="handleSizeChange"
      @current-change="handleCurrentChange"
    />
  </el-row>
</template>

<script>

export default {
  name: 'VueHrPaging',
  props: {
    total: {
      type: Number,
      required: true
    },
    pageParams: {
      type: Object,
      required: true
    }

  },
  methods: {
    // 更新当前页数据量
    handleSizeChange(val) {
      this.$emit('setSizeChange', val)
    },
    // 更新当前页码
    handleCurrentChange(val) {
      this.$emit('setCurrentChange', val)
    }
  }
}
</script>

<style lang="scss" scoped>

</style>
